<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <script type="text/javascript" language="javascript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.tagName != 'BUTTON')
                        event.keyCode = 9;
                }
            }
        </script>
        <style type="text/css">
            .col-1 {
                width: 87%;
            }

            .col-2 {
                width: 13%;
            }
        </style>
    </ui:define>
    <ui:define name="content">
        <div style="margin:5px">
            <p:tabView id="tabview" dynamic="true" cache="false" style="font-weight:normal;font-style:normal">
                <p:tab title="卡号校验码生成">
                    <h:form id="form">
                        <p:messages id="msgs" showDetail="false"/>
                        <p:panel style="margin-top:10px" id="panel">
                            <h:panelGrid columns="4" cellspacing="5" style="text-align: right;">
                                <h:outputLabel value="卡号:"/>
                                <p:inputText value="#{cardChkCodeAction.cardNo}" size="27"/>
                                <h:outputLabel/>
                                <p:commandButton id="refuseBtn" value="生成校验码" style="width:120px;margin-left:30px;"
                                                 action="#{cardChkCodeAction.makeChkNumber}"
                                                 update="form,msgs"/>
                            </h:panelGrid>
                            <p:separator/>
                            <br/>
                            <h:outputLabel value="校验位:"/>
                            <p:inputText value="#{cardChkCodeAction.chkNumber}" size="27" maxlength="40"
                                         readonly="true"/>

                            <h:outputLabel value="生成卡号:" style="margin-left: 30px;"/>
                            <p:inputText value="#{cardChkCodeAction.realCardNo}" size="27" maxlength="40"
                                         readonly="true"/>
                        </p:panel>
                    </h:form>
                </p:tab>
            </p:tabView>
        </div>
    </ui:define>
</ui:composition>